package com.zz.inventory.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zz.inventory.mapper.FranchisePaymentsMapper;
import com.zz.inventory.domain.FranchisePayments;
import com.zz.inventory.service.IFranchisePaymentsService;

/**
 * 支付记录Service业务层处理
 * 
 * @author zz
 * @date 2025-07-03
 */
@Service
public class FranchisePaymentsServiceImpl implements IFranchisePaymentsService 
{
    @Autowired
    private FranchisePaymentsMapper franchisePaymentsMapper;

    /**
     * 查询支付记录
     * 
     * @param paymentId 支付记录主键
     * @return 支付记录
     */
    @Override
    public FranchisePayments selectFranchisePaymentsByPaymentId(Long paymentId)
    {
        return franchisePaymentsMapper.selectFranchisePaymentsByPaymentId(paymentId);
    }

    /**
     * 查询支付记录列表
     * 
     * @param franchisePayments 支付记录
     * @return 支付记录
     */
    @Override
    public List<FranchisePayments> selectFranchisePaymentsList(FranchisePayments franchisePayments)
    {
        return franchisePaymentsMapper.selectFranchisePaymentsList(franchisePayments);
    }

    /**
     * 新增支付记录
     * 
     * @param franchisePayments 支付记录
     * @return 结果
     */
    @Override
    public int insertFranchisePayments(FranchisePayments franchisePayments)
    {
        franchisePayments.setCreateTime(DateUtils.getNowDate());
        return franchisePaymentsMapper.insertFranchisePayments(franchisePayments);
    }

    /**
     * 修改支付记录
     * 
     * @param franchisePayments 支付记录
     * @return 结果
     */
    @Override
    public int updateFranchisePayments(FranchisePayments franchisePayments)
    {
        return franchisePaymentsMapper.updateFranchisePayments(franchisePayments);
    }

    /**
     * 批量删除支付记录
     * 
     * @param paymentIds 需要删除的支付记录主键
     * @return 结果
     */
    @Override
    public int deleteFranchisePaymentsByPaymentIds(Long[] paymentIds)
    {
        return franchisePaymentsMapper.deleteFranchisePaymentsByPaymentIds(paymentIds);
    }

    /**
     * 删除支付记录信息
     * 
     * @param paymentId 支付记录主键
     * @return 结果
     */
    @Override
    public int deleteFranchisePaymentsByPaymentId(Long paymentId)
    {
        return franchisePaymentsMapper.deleteFranchisePaymentsByPaymentId(paymentId);
    }
}
